#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

int main() {
    string target; cin >> target;
    string result;
    if (target.size() & 1) {
        string firstHalf = target.substr(0, target.size() / 2);
        string lastHalf = target.substr(target.size() / 2 + 1, target.size() / 2);
        sort(firstHalf.begin(), firstHalf.end(), greater<char>());
        reverse(lastHalf.begin(), lastHalf.end());
        result = firstHalf + target[target.size() / 2] + lastHalf;
    }
    else {
        string firstHalf = target.substr(0, target.size() / 2);
        string lastHalf = target.substr(target.size() / 2, target.size() / 2);
        sort(firstHalf.begin(), firstHalf.end(), greater<char>());
        reverse(lastHalf.begin(), lastHalf.end());
        result = firstHalf + lastHalf;
    }
    cout << result;
    return 0;
}